<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Systems of equations',
	'<{subtitle}>' => 'Written in <span title="College Algebra">MATH 1201</span> by <a href="https://y.st./">Alex Yst</a>, finalised on 2018-03-14',
	'<{copyright year}>' => '2018',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<section id="problem0">
	<h2>Problem 0</h2>
	<p>
		We can easily see that adding the two equations would cancel out y, so we start with that.
		Adding them results in this equation:
	</p>
	<p>
		3x = 18
	</p>
	<p>
		The solution to x is right there for the taking.
		Just divide by three and we see x equals 6.
		From there, we can plug six into the original equations:
	</p>
	<p>
		2 * 6 + y = 5<br/>
		6 - y = 13
	</p>
	<p>
		The second equation is easier to solve, but to make sure the system is consistent, we should solve them both:
	</p>
	<p>
		12 + y = 5<br/>
		-7 - y = 0
	</p>
	<p>
		y = -7<br/>
		-7 = y
	</p>
	<p>
		Reducing both equations to gives us an equality between y and negative seven.
		To verify, we can plug our found x and y back into the original system:
	</p>
	<p>
		2 * 6 + -7 = 5<br/>
		6 - -7 = 13
	</p>
	<p>
		Both equations check out, so <strong>the solution to the system is the ordered pair (6, -7)</strong>.
	</p>
</section>
<section id="problem1">
	<h2>Problem 1</h2>
	<p>
		The problem at hand can be rewritten as a system:
	</p>
	<div style="display: table;">
		<p style="display: table-row;">
			<span style="display: table-cell; vertical-align: middle;">
				f(x) =
			</span>
			<span style="display: table-cell; font-size: 4em; vertical-align: middle;">
				{
			</span>
			<span style="display: table-cell; vertical-align: middle;">
				2*Arianna - Bobby = 3<br/>
				Arianna + Bobby = 9
			</span>
		</p>
	</div>
	<p>
		(We could easily use shorter variable names, such as &quot;a&quot; and &quot;b&quot;, but I chose to use the names of the people.
		I&apos;m a programmer, and as a programmer, I often work with descriptive, multi-letter variable names in the algebra I write into my code.)
	</p>
	<p>
		Like in Problem 0, here, we can see that adding the equations will again cancel a variable; in this case, Bobby.
		Adding them, we see that three times Arianna&apos;s age is twelve.
		Divide that by three, and we see Arianna&apos;s age is four years.
		If four years plus Bobby&apos;s age is nine years, Bobby is clearly five years old.
		Likewise, if two times Arianna&apos;s age minus Bobby&apos;s age is three years, Bobby is clearly five years old.
		The system is consistent.
		<strong>We find that Arianna is four years old and Bobby is five years old.</strong>
	</p>
</section>
<section id="problem2">
	<h2>Problem 2</h2>
	<p>
		The final problem is more complex, but again, we can eliminate y by simply adding the equations.
		That gives us one equation with one variable to work with:
	</p>
	<p>
		6x = x<sup>2</sup> + 8
	</p>
	<p>
		We can probably solve this using system-based further methods, but there&apos;s a much easier way to go about this: we can reformat it as a quadratic equation by subtracting 6x from both sides, then factor and find the zeros:
		
	</p>
	<p>
		0 = x<sup>2</sup> - 6x + 8<br/>
		0 = (x - 2) * (x - 4)
	</p>
	<p>
		We can see that in this factored variant that the zeros are two and four, so we have two solutions to our initial system.
		We just have to plug both solutions for x into our initial equations, one at a time, to find the y values that go along with them.
		For x = 2:
	</p>
	<p>
		y = 2<sup>2</sup> + 5<br/>
		6*2 - y = 3
	</p>
	<p>
		y = 4 + 5<br/>
		12 - y = 3
	</p>
	<p>
		y = 9<br/>
		12 - y = 3
	</p>
	<p>
		y = 9<br/>
		9 - y = 0
	</p>
	<p>
		y = 9<br/>
		9 = y
	</p>
	<p>
		Using the value two for x gives us a consistent y = 9.
		For x = 4:
	</p>
	<p>
		y = 4<sup>2</sup> + 5<br/>
		6 * 4 - y = 3
	</p>
	<p>
		y = 16 + 5<br/>
		24 - y = 3
	</p>
	<p>
		y = 21<br/>
		21 - y = 0
	</p>
	<p>
		y = 21<br/>
		21 = y
	</p>
	<p>
		Using the value four for x, we get the consistent solution that y is equal to twenty-one.
		<strong>That means our solution to this system is the two ordered pairs (2, 9) and (4, 21).</strong>
	</p>
</section>
END
);
